﻿using System;
using System.Configuration;
using System.Diagnostics;

namespace Wheels
{
    internal class Settings
    {
        public static string GoogleMapsStaticApiKey
        {
            [DebuggerStepThrough]
            get
            {
                String value = ConfigurationManager.AppSettings["GoogleMapsStaticApiKey"];
                if (value == null)
                {
                    throw new ApplicationException("There is no appSettings with ket \"GoogleMapsStaticApiKey\".");
                }
                return value;
            }
        }

        public static string BingMapsApiKey
        {
            get { return ConfigurationManager.AppSettings["BingMapsApiKey"]; }
        }

        public static int MapScreenWidth
        {
            get { return Int32.Parse(ConfigurationManager.AppSettings["MapScreenWidth"]); }
        }

        public static int MapScreenHeight
        {
            get { return Int32.Parse(ConfigurationManager.AppSettings["MapScreenHeight"]); }
        }

        public static int MapDefaultZoomLevel
        {
            get { return 15; }
        }

        public static Double MapDefaultLocationLat
        {
            get { return 38.896778; }
        }

        public static Double MapDefaultLocationLong
        {
            get { return -77.036476; }
        }
    }
}